﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TerryDong.Data;
using TerryDong.DAL.IDAL;
using TerryDong.DAL.DataModels;

namespace TerryDong.DAL.DALSqlServer
{
    public class system_logsDAL 
    {
        private DataContext<system_logsDataModel> _DataContext = null;

        /// <summary>
        /// 默认实例 
        /// </summary>
        public system_logsDAL()
        {
            _DataContext = DataContext<system_logsDataModel>.CreateInstance(system_logsDataModel.m_DefalutConn,system_logsDataModel.m_TableName);
        }

        /// <summary>
        /// 传入的conn实例
        /// </summary>
        /// <param name="conn"></param>
        public system_logsDAL(string conn)
        {
            _DataContext = DataContext<system_logsDataModel>.CreateInstance(conn,system_logsDataModel.m_TableName);
        }

        public DataContext<system_logsDataModel> DataContext { get { return _DataContext; } }
    }
}